




//
//  PriceSearchView.m
//  住房条件帅选器
//
//  Created by MB__Lee on 2018/5/16.
//  Copyright © 2018年 MB__Lee. All rights reserved.
//

#import "PriceSearchView.h"

@interface PriceSearchView()
@property (weak, nonatomic) IBOutlet UITextField *minField;
@property (weak, nonatomic) IBOutlet UITextField *maxField;



@property (weak, nonatomic) IBOutlet UIButton *sureBTN;

@end


@implementation PriceSearchView
-(void)awakeFromNib{
    [super awakeFromNib];
    
    self.sureBTN.layer.borderColor = MB_mainSelectedColor.CGColor;
    self.sureBTN.layer.borderWidth = 0.5;
    
    self.minField.layer.cornerRadius = 2;
    self.maxField.layer.cornerRadius = 2;
    self.minField.clipsToBounds = YES;
    self.maxField.clipsToBounds = YES;
 
}


- (IBAction)SureButton:(UIButton *)sender {
    
    if ([self.delegate respondsToSelector:@selector(PriceSearchView:sendPriceModel:)]) {
        PriceModel *model  = [[PriceModel alloc] init];
        model.name = @"自定义";
        model.value_start = _minField.text;
        model.value_end = _maxField.text;
        
        [self.delegate PriceSearchView:self sendPriceModel:model];
    }

}
-(void)setPlaceHolderMin:(NSString *)min max:(NSString *)max{
    _minField.placeholder = min;
    _maxField.placeholder = max;
}


@end
